package com.example.demo.service;

import com.example.demo.pojo.Article;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: YKH
 * Date: 2023-01-07
 * Time: 11:23
 */
public interface ArticleService {

    /**
     * 根据用户名获取文章数据
     * @param username
     * @return
     */
    List<Article> getArticleByUser(String username);

    List<Article> getArticleList(Integer id);

    /**
     * 根据文章Id 查看文章详情
     * @param id
     * @return
     */
    Article getArticleDetails(Integer id);

    int updateArticle(Integer aid, Integer uid, String title, String content);

    int deleteArticle(Integer aid);

    List<Article> getList(Integer psize, Integer offset);

    Integer getCount();

    int addArticle(Integer uid, String title, String content);
}
